<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="myschool.mybatisUtil.MybatisUtil" %>
<%@ page import="com.github.pagehelper.PageHelper" %>
<%@ page import="myschool.entity.Student" %>
<%@ page import="java.util.List" %>
<%@ page import="myschool.dao.GradeDao" %>
<%@ page import="myschool.entity.Grade" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/6/5
  Time: 17:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table border="1">
<%
    SqlSession s= MybatisUtil.get();
    GradeDao mapper = s.getMapper(GradeDao.class);
    PageHelper.startPage(1,20);
    List<Grade> grades = mapper.paging3();
    MybatisUtil.close(s);
    for(Grade grade:grades) {
%>
<tr>
    <td><%=grade.getId()%></td>
    <td><%=grade.getGname()%></td>
</tr>
<%}%>
</table>
</body>
</html>
